package com.hafu.swing;
import javax.swing.*;
import java.awt.*;

public class StudyFrame extends JFrame {
    public StudyFrame(String studentId, int courseId) {
        setTitle("学习界面 - 学生ID：" + studentId + " 课程ID：" + courseId);
        setSize(500, 300);
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        setLocationRelativeTo(null);
        setVisible(true);

        // 示例内容
        JLabel label = new JLabel("正在学习课程 ID: " + courseId);
        label.setHorizontalAlignment(SwingConstants.CENTER);
        label.setFont(new Font("微软雅黑", Font.BOLD, 16));
        add(label, BorderLayout.CENTER);
    }
}